import React,{Component} from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  Image,
  TextInput,
  View,
  Button,

}from 'react-native';

import KyAS from  './Tool/KyAsyncStorage';

module.exports  = class QQLoginView extends Component{
  render(){
      let person = {
          name:'yu-vin',
          age:23
      }
      KyAS.save('person',JSON.stringify(person));

      KyAS.get('person').then((value)=>{
          console.log('fangyukui');
          console.log(value);
      });




     return(

       <View style={styles.container}>
          <Image source={require('./img/icon.png')} style={styles.topIconStyle}></Image>
          <TextInput style={styles.textInputStyle} placeholder="QQ号码" keyboardType="numeric"></TextInput>
          <TextInput style={styles.textInputStyle} placeholder="密码" keyboardType="numeric"></TextInput>
          <View style={styles.loginbtnStyle}>
            <Text style={styles.loginbtnTextStyle}>登录</Text>
          </View>

          <View style={styles.shareStyle}>
             <Text>分享</Text>
             <Image source={require('./img/icon3.png')} style={styles.shareIcon}></Image>
             <Image source={require('./img/icon7.png')} style={styles.shareIcon}></Image>
             <Image source={require('./img/icon8.png')} style={styles.shareIcon}></Image>
          </View>

       </View>



     );

  }
  loginClick(){

  }
}

const styles = StyleSheet.create({
   container:{
     flex:1,
     backgroundColor:'#dddddd',
     alignItems:'center'

   },
   topIconStyle:{
      width:80,
      height:80,
      marginTop:100,
      borderRadius:40

   },
   textInputStyle:{
     width:300,
     height:44,
     backgroundColor:'white',
     marginTop:8,
     borderWidth:1,
     borderColor:'lightgray',
     borderRadius:8,
     alignSelf:'center'

   },
   buttonStyle:{
     backgroundColor:'red',
     width:300,
     height:44,
     color:'black'
   },
   loginbtnStyle:{
     width:300,
     height:44,
     backgroundColor:'orange',
     alignItems:'center',
     justifyContent:'center',
     marginTop:8,
     borderRadius:8
   },
   loginbtnTextStyle:{
     color:'white',
     fontSize:18,
     textAlign:'center'

   },
   shareStyle:{
     flexDirection:'row',
     justifyContent:'center',
     alignItems:'center',
     position:'absolute',
     left:10,
     bottom:10
   },
   shareIcon:{
     width:40,
     height:40,
     borderRadius:20,


   }
});
